from django.urls import path
from apps.answer.views import WaitQuestionsView, HotQuestionsView, NewQuestionsView, \
    QuestionLabeltUserView, QuestionDetailView, QuestionCreateModelViewSet, CreateReplyView, \
    UsefulView, UnusefulView, ReplyUsefulView, ReplyUnusefulView, AddQuestionVisitView, LabelsDetailView, \
    LabelsFocusoutView
from apps.answer.views import UserLabelsView

urlpatterns = [



    #  问答所有标签
    path('labels/',UserLabelsView.as_view()),
    #  用户关注的标签
    path('labels/users/',QuestionLabeltUserView.as_view()),
    # 更多
    path('labels/full/', UserLabelsView.as_view()),

    # 问题详情
    path('questions/<pk>/', QuestionDetailView.as_view()),



    # 最新回答
    path('questions/<pk>/label/new/', NewQuestionsView.as_view()),
    # 热门回答
    path('questions/<pk>/label/hot/', HotQuestionsView.as_view()),
    # 等待回答
    path('questions/<pk>/label/wait/', WaitQuestionsView.as_view()),


    # 发布问题
    path('questions/',QuestionCreateModelViewSet.as_view()),



    # 上传图片
    # path('upload/common/',UploadImageView.as_view()),




    # 评论问题
    path('reply/',CreateReplyView.as_view()),



    # 问题有用
    path('questions/<pk>/useful/',UsefulView.as_view()),


    # 问题没用
    path('questions/<pk>/unuseful/',UnusefulView.as_view()),


    # 回答有用
    path('reply/<pk>/useful/', ReplyUsefulView.as_view()),


    # 回答没用
    path('reply/<pk>/unuseful/', ReplyUnusefulView.as_view()),


    # 增加访问量
    path('question/<pk>/visit/',AddQuestionVisitView.as_view()),



    # 标签详情
    path('labels/<pk>/',LabelsDetailView.as_view()),





    # 取消关注标签
    path('labels/<pk>/focusin/',LabelsFocusoutView.as_view()),
    path('labels/<pk>/focusout/',LabelsFocusoutView.as_view()),

]
